/*
 * @Description: 继承
 * @Author: rendc
 * @Date: 2022-10-10 11:50:47
 * @LastEditors: rendc
 * @LastEditTime: 2022-10-10 11:58:39
 */
function Animal (color, age) {
  this.color = color;
  this.age = age;
}
Animal.prototype.call = function () {
  console.log("Animal is calling...");
}
function Dog (color, age, destruction) {
  // 经典继承 继承属性
  Animal.call(this, color, age);
  this.destruction = destruction;
}
// 原型继承 继承方法
Dog.prototype = new Animal();

var dog = new Dog('黑白', 1, "拆家");
console.log('🤡 CC - dog', dog);
dog.call();